//
// Created by Administrator on 2024/3/26.
//
#include<bits/stdc++.h>

using namespace std;
using ll = long long;
const int n = 100;


ll H[101], a, b, c, d, e, f;

/**
 * @return
 */
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    for (int i = 1; i <= n; i++) {
        H[i] = 1ll * i * i * i * i * i;
    }
    for (e = 1; e < n; e++)
        for (d = 1; d <= e; d++)
            for (c = 1; c <= d; c++)
                for (b = 1; b <= c; b++)
                    for (a = 1; a <= b; a++) {
                        ll x = H[e] + H[d] + H[c] + H[b] + H[a];
                        f = lower_bound(H + e + 1, H + n + 1, x) - H;
                        if (H[f] == x) {
                            cout << a << " " << b << " " << c << " " << d << " " << e << " " << f << endl;
                        }

                    }


    return 0;
}